# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @Project   :template 
# @FileName  :commons.py
# @Time      :2023/12/1 15:44
# @Author    :zxc19
# @IDE       :PyCharm
# @DESC      :
import sys
import traceback

from loguru import logger


def missing_extra(package: str, extra: str):
    """
    丢失扩展包,退出
    :param package: 包名
    :param extra:
    :return:
    """
    traceback.print_exc()
    logger.error(
        f"'{package}' 默认未安装, 您需要先安装 'pip install {extra}'"
    )
    sys.exit(1)


if __name__ == "__main__":
    run_code = 0

